import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
import LoginView from '../views/LoginView.vue'
import RegisterView from '../views/RegisterView.vue'
import text2imgRoutes from './text2img'
import img2imgRoutes from './img2img'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: HomeView
    },
    {
      path: '/image-gallery',
      name: 'image-gallery',
      component: () => import('../views/GalleryView.vue')
    },
    {
      path: '/hanzi-generation',
      name: 'hanzi-generation',
      component: () => import('../views/Hanzi/HanziGeneration.vue')
    },
    ...text2imgRoutes,
    ...img2imgRoutes,
    {
      path: '/login',
      name: 'login',
      component: LoginView
    },
    {
      path: '/register',
      name: 'register',
      component: RegisterView
    }
  ]
})

export default router

